package com.energy.analysis.basic.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.energy.analysis.basic.entity.PriceData;
import com.energy.analysis.basic.mapper.PriceMapper;
import com.energy.analysis.comm.base.BaseMapper;
import com.energy.analysis.comm.base.BaseService;

@Service
public class PriceService extends BaseService<PriceData>{
	
	@Autowired
	private PriceMapper priceMapper;
	
	public PriceData getPriceData() {
		return priceMapper.getPriceData();
	}
	
	public PriceData getPriceById(int id) {
		return priceMapper.getPriceById(id);
	}
	
	public boolean insertPriceData(PriceData priceData) {
		return priceMapper.insertPriceData(priceData) > 0;
	}
	
	public boolean updatePriceData(PriceData priceData) {
		return priceMapper.updatePriceData(priceData) > 0;
	}
	
	@Override
	public BaseMapper<PriceData> getMapper() {
		return priceMapper;
	}
}
